package com.example.app1;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

import com.example.app1.globule.TheScreenView;

public class MainActivity extends AppCompatActivity {
    TheScreenView mScreen;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //mScreen是自定义的View  
        mScreen = new TheScreenView(this);
        setContentView(mScreen);
    }


    //为避免在程序退出后线程仍在进行,造成不必要的系统资源浪费,在Activity退出是时候,主动将线程停止
    @Override
    public void onDestroy()
    {
        mScreen.stopDrawing();
        super.onDestroy();
    }
}
